package androidx.gdata.spreadsheets.xml;

import java.io.PrintWriter;

import androidx.gdata.XMLSerializer;
import androidx.gdata.spreadsheets.GSX;
import androidx.gdata.spreadsheets.ListEntry;

public class ListEntrySerializer implements XMLSerializer<ListEntry> {
  
  public void serialize(PrintWriter out, ListEntry listEntry) {
    out.println("<entry xmlns='http://www.w3.org/2005/Atom' " +
        "xmlns:gsx='http://schemas.google.com/spreadsheets/2006/extended'>");
    for (GSX gsx : listEntry.getGsx()) {
      out.println("  <gsx:" + gsx.getColumn() + ">" + gsx.getContent() +
          "</gsx:" + gsx.getColumn() + ">");
    }
    out.println("</entry>");
  }

}
